﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
  
        public void MapWAFARBEN(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWAFARBEN(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWAFARBEN(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }

            MapWAFARBEN(ref dwLocal, dwData);

            if (!flgExist)
            {
                InsertWAFARBEN(dwLocal);
            }
            UpdateWAFARBEN(dwLocal);
        }
        public void InsertWAFARBEN(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "INSERT INTO WAFARBEN(WAFMANDANT, WAFKUNDNR, WAFWERK, WAFABT, WAFART, WAFVAR, WAFZUART, WAFZUSATZ, WAFCOLORIT, WAFSTATUS, WAFSFKZ, WAFBEZ, WAFTEXTSCHL, WAFFKARTNR, WAFROHFARBE, WAFMUDESS, WAFUNIFARB, WAFVGRQM, WAFVOLU, WAFZTWAHL, WAFRAPPH, WAFRAPPB, WAFRUESTGRP, WAFPRUEFGRP, WAFSCHABANZ, WAFUSCHABANZ, WAFFDVF, WAFPRGRP, WAFGRPBEZ, WAFPREIS, WAFZUABPR, WAFZUABAB, WAFNFART, WAFWERT, WAFKZPA, WAFZUABVH, WAFZUABAK, WAFZUABKU, WAFZUABPROZ, WAFEZUSTAND1, WAFEZUSTAND2, WAFEZUSTAND3, WAFEZUSTAND4, WAFEZUSTAND5, WAFEZUSTAND6, WAFEZUSTAND7, WAFEZUSTAND8, WAFEZUSTAND9, WAFEZUSTAND10, WAFFA, WAFGA, WAFQA, WAFQPKTH, WAFQPKTLH, WAFLOAN, WAFLBAN, WAFLPAN, WAFABKZAN, WAFPKL, WAFVBBRT, WAFBRTTOLPL, WAFBRTTOLMI, WAFVBGRQM, WAFVBGRLFD, WAFGWTOLPL, WAFGWTOLMIN, WAFVBFDDIK, WAFFDKTOLPL, WAFFDKTOLMI, WAFVBFDDIS, WAFFDSTOLPL, WAFFDSTOLMI, WAFLAEAEND, WAFGWVERL, WAFRESTSCHL, WAFPHWERTMI, WAFPHWERTMA, WAFWEISSGRD, WAFNETZFVON, WAFNETZFBIS, WAFNETZFSEK, WAFRSSFTRKV, WAFRSSFTRKB, WAFRSSFTRSV, WAFRSSFTRSB, WAFUNIFAEH, WAFFADGERAD, WAFMUSTFRB, WAFVORB, WAFNACHB, WAFMU, WAFMURLOD, WAFMUPROD, WAFMUCTOD, WAFMUDTRL, WAFMUBIRL, WAFHUNGLFM, WAFHUNGQM, WAFHUNBRT, WAFHUNFDK, WAFHUNFDS, WAFLMANRKRS, WAFLMALFDNR, WAFLMAPOS, WAFLODKRS, WAFLODLFD, WAFLODPOS, WAFKZDUMCOL, WAFPSEUDOCOL, WAFPRFSCHL, WAFFILLER, WAFAENDZL, WAFAENDBEN, WAFAENDDAT, WAFNEUBEN, WAFNEUDAT)"
                + "VALUES (:WAFMANDANT, '00000000', '   ', '   ',:WAFART,:WAFVAR, :WAFZUART,:WAFZUSATZ, '          ', 'A', 'N', :WAFBEZ"
            + ", '          ', '          ', '          ', '          ', '          ', 0, 0, 0, 0, 0, '   ', ' ', 0, 0, '   ', ' ', '                    ', 0, 0, 0, '    ', 0, ' ', 0, 0, 0, ' ', '    ', '    ', '    ', '    ', '    ', '    ', '    ', '    '"
            + ", '    ', '    ', 0, 0, 0, 0, 0, '  ', '  ', '        ', ' ', '  ', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', ' ', '          ', '   ', '   ', ' ', '00', '00', ' '"
            + ", 0, '        ', ' ', ' ', ' ', ' ', ' ', '  ', '    ', '  ', '  ', '      ', '   ', ' ', '          ', '         ', '                                                           ', 0, '        ', 0, :WAFNEUBEN, :WAFNEUDAT)";
            or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
            or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
            or1.Parameters.Add("WAFVAR", OracleType.NVarChar).Value = dwData["WAFVAR"].ToString();
            or1.Parameters.Add("WAFZUART", OracleType.NVarChar).Value = dwData["WAFZUART"].ToString();
            or1.Parameters.Add("WAFZUSATZ", OracleType.NVarChar).Value = dwData["WAFZUSATZ"].ToString();
            or1.Parameters.Add("WAFBEZ", OracleType.NVarChar).Value = dwData["WAFBEZ"].ToString();
            or1.Parameters.Add("WAFNEUBEN", OracleType.NVarChar).Value = dwData["WAFNEUBEN"].ToString();
            or1.Parameters.Add("WAFNEUDAT", OracleType.Number).Value = dwData["WAFNEUDAT"].ToString();
            Connect2Proxy(or1);
        }
        public void DeleteWAFARBEN(string client, string art, string var, string color)
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE WAFARBEN WHERE   "
                + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART AND WAFVAR=:WAFVAR AND WAFZUSATZ=:WAFZUSATZ";
            or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = client;
            or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = art;
            or1.Parameters.Add("WAFVAR", OracleType.NVarChar).Value = var;
            or1.Parameters.Add("WAFZUSATZ", OracleType.NVarChar).Value = color;

            Connect2Proxy(or1);
        }
        public DataSet QueryWAFARBEN(DataRow dwData, int option = 1)
        {
            DataSet setReturn = new DataSet();
            DataSet Result = new DataSet();
            DataTable tbLocal = null;
            OracleCommand or1 = null;
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WAFARBEN WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT * FROM WAFARBEN WHERE   "
                    + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART AND WAFVAR=:WAFVAR AND WAFZUART=:WAFZUART AND WAFZUSATZ=:WAFZUSATZ ";
                    or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
                    or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
                    or1.Parameters.Add("WAFVAR", OracleType.NVarChar).Value = dwData["WAFVAR"].ToString();
                    or1.Parameters.Add("WAFZUART", OracleType.NVarChar).Value = dwData["WAFZUART"].ToString();
                    or1.Parameters.Add("WAFZUSATZ", OracleType.NVarChar).Value = dwData["WAFZUSATZ"].ToString();
                    break;
                case 2:
                    or1.CommandText = "SELECT * FROM WAFARBEN WHERE   "
                    + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART AND WAFVAR=:WAFVAR ";
                    or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
                    or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
                    or1.Parameters.Add("WAFVAR", OracleType.NVarChar).Value = dwData["WAFVAR"].ToString();
                    break;
                case 3:
                    or1.CommandText = "SELECT WAFART,WAFVAR,WAFZUSATZ,WAFZUABAK FROM WAFARBEN WHERE   "
                    + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART AND WAFVAR=:WAFVAR ";
                    or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
                    or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
                    or1.Parameters.Add("WAFVAR", OracleType.NVarChar).Value = dwData["WAFVAR"].ToString();
                    break;
                case 4:
                    or1.CommandText = "SELECT DISTINCT WF.* FROM WDECK WD RIGHT JOIN WAFARBEN WF ON"
                        + "  WAFMANDANT=WDMANDANT AND WAFART=WDART AND WAFVAR=WDVAR"
                        + " WHERE WDMANDANT=:WDMANDANT AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS  AND WDAUFLFD=:WDAUFLFD";
                    or1.Parameters.Add("WDMANDANT", OracleType.NVarChar).Value = dwData["WDMANDANT"].ToString();
                    or1.Parameters.Add("WDAUFKRS", OracleType.NVarChar).Value = dwData["WDAUFKRS"].ToString();
                    or1.Parameters.Add("WDAUFLFD", OracleType.NVarChar).Value = dwData["WDAUFLFD"].ToString();
                    break;
                case 5:
                    or1.CommandText = "SELECT * FROM WAFARBEN WHERE   "
                    + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART  ";
                    or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
                    or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
                    break;
                case 6:
                    or1.CommandText = "SELECT DISTINCT  W.* FROM WDECK  WD "
                        + " JOIN WAFARBEN W ON WDART=W.WAFART AND WDVAR=W.WAFVAR AND WDFARBE=WAFZUSATZ AND WAFZUART=:WAFZUART"
                        + " WHERE WDMANDANT=:WDMANDANT AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS  AND WDAUFLFD=:WDAUFLFD";
                    or1.Parameters.Add("WDMANDANT", OracleType.NVarChar).Value = dwData["WDMANDANT"].ToString();
                    or1.Parameters.Add("WDAUFKRS", OracleType.NVarChar).Value = dwData["WDAUFKRS"].ToString();
                    or1.Parameters.Add("WDAUFLFD", OracleType.NVarChar).Value = dwData["WDAUFLFD"].ToString();
                    or1.Parameters.Add("WAFZUART", OracleType.NVarChar).Value = dwData["WDSA"].ToString();
                    break;
                case 7:
                    or1.CommandText = "SELECT  DISTINCT W.* FROM WDECK  WD "
                        + " JOIN WAFARBEN W ON WDART=W.WAFART AND WDVAR=W.WAFVAR AND WDBESCHICH=WAFZUSATZ AND WAFZUART=:WAFZUART"
                        + " WHERE WDMANDANT=:WDMANDANT AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS  AND WDAUFLFD=:WDAUFLFD";
                    or1.Parameters.Add("WDMANDANT", OracleType.NVarChar).Value = dwData["WDMANDANT"].ToString();
                    or1.Parameters.Add("WDAUFKRS", OracleType.NVarChar).Value = dwData["WDAUFKRS"].ToString();
                    or1.Parameters.Add("WDAUFLFD", OracleType.NVarChar).Value = dwData["WDAUFLFD"].ToString();
                    or1.Parameters.Add("WAFZUART", OracleType.NVarChar).Value = dwData["WDSA"].ToString();
                    break;
                case 8:
                    or1.CommandText = "SELECT WAFZUSATZ AS FSFFARBE,WAFBEZ AS FSFABEZ FROM WAFARBEN  WHERE   "
                    + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART";
                    or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
                    or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
                    break;
                case 51:
                    or1.CommandText = "SELECT WAFZUSATZ AS FSFFARBE FROM WAFARBEN WHERE   "
                    + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART  ";
                    or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
                    or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
                    break;
                default:
                    break;
            }

            Result = Connect2Proxy(or1);

            if (Result.Tables.Count > 0)
            {
                tbLocal = Result.Tables[0];
                tbLocal.TableName = "WAFARBEN";
            }
            setReturn.Merge(Result);
            return setReturn;
        }
        public void UpdateWAFARBEN(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE WAFARBEN SET "
                + "WAFLMANRKRS=:WAFLMANRKRS,"
                + "WAFLMALFDNR=:WAFLMALFDNR,"
                + "WAFLMAPOS=:WAFLMAPOS,"
                + "WAFLODKRS=:WAFLODKRS,"
                + "WAFLODLFD=:WAFLODLFD,"
                + "WAFLODPOS=:WAFLODPOS,"
                + "WAFKZDUMCOL=:WAFKZDUMCOL,"
                + "WAFPSEUDOCOL=:WAFPSEUDOCOL,"
                + "WAFPRFSCHL=:WAFPRFSCHL,"
                + "WAFFILLER=:WAFFILLER,"
                + "WAFAENDZL=:WAFAENDZL,"
                + "WAFAENDBEN=:WAFAENDBEN,"
                + "WAFAENDDAT=:WAFAENDDAT,"
                + "WAFNEUBEN=:WAFNEUBEN,"
                + "WAFNEUDAT=:WAFNEUDAT,"
                + "WAFMANDANT=:WAFMANDANT,"
                + "WAFKUNDNR=:WAFKUNDNR,"
                + "WAFWERK=:WAFWERK,"
                + "WAFABT=:WAFABT,"
                + "WAFART=:WAFART,"
                + "WAFVAR=:WAFVAR,"
                + "WAFZUART=:WAFZUART,"
                + "WAFZUSATZ=:WAFZUSATZ,"
                + "WAFCOLORIT=:WAFCOLORIT,"
                + "WAFSTATUS=:WAFSTATUS,"
                + "WAFSFKZ=:WAFSFKZ,"
                + "WAFBEZ=:WAFBEZ,"
                + "WAFTEXTSCHL=:WAFTEXTSCHL,"
                + "WAFFKARTNR=:WAFFKARTNR,"
                + "WAFROHFARBE=:WAFROHFARBE,"
                + "WAFMUDESS=:WAFMUDESS,"
                + "WAFUNIFARB=:WAFUNIFARB,"
                + "WAFVGRQM=:WAFVGRQM,"
                + "WAFVOLU=:WAFVOLU,"
                + "WAFZTWAHL=:WAFZTWAHL,"
                + "WAFRAPPH=:WAFRAPPH,"
                + "WAFRAPPB=:WAFRAPPB,"
                + "WAFRUESTGRP=:WAFRUESTGRP,"
                + "WAFPRUEFGRP=:WAFPRUEFGRP,"
                + "WAFSCHABANZ=:WAFSCHABANZ,"
                + "WAFUSCHABANZ=:WAFUSCHABANZ,"
                + "WAFFDVF=:WAFFDVF,"
                + "WAFPRGRP=:WAFPRGRP,"
                + "WAFGRPBEZ=:WAFGRPBEZ,"
                + "WAFPREIS=:WAFPREIS,"
                + "WAFZUABPR=:WAFZUABPR,"
                + "WAFZUABAB=:WAFZUABAB,"
                + "WAFNFART=:WAFNFART,"
                + "WAFWERT=:WAFWERT,"
                + "WAFKZPA=:WAFKZPA,"
                + "WAFZUABVH=:WAFZUABVH,"
                + "WAFZUABAK=:WAFZUABAK,"
                + "WAFZUABKU=:WAFZUABKU,"
                + "WAFZUABPROZ=:WAFZUABPROZ,"
                + "WAFEZUSTAND1=:WAFEZUSTAND1,"
                + "WAFEZUSTAND2=:WAFEZUSTAND2,"
                + "WAFEZUSTAND3=:WAFEZUSTAND3,"
                + "WAFEZUSTAND4=:WAFEZUSTAND4,"
                + "WAFEZUSTAND5=:WAFEZUSTAND5,"
                + "WAFEZUSTAND6=:WAFEZUSTAND6,"
                + "WAFEZUSTAND7=:WAFEZUSTAND7,"
                + "WAFEZUSTAND8=:WAFEZUSTAND8,"
                + "WAFEZUSTAND9=:WAFEZUSTAND9,"
                + "WAFEZUSTAND10=:WAFEZUSTAND10,"
                + "WAFFA=:WAFFA,"
                + "WAFGA=:WAFGA,"
                + "WAFQA=:WAFQA,"
                + "WAFQPKTH=:WAFQPKTH,"
                + "WAFQPKTLH=:WAFQPKTLH,"
                + "WAFLOAN=:WAFLOAN,"
                + "WAFLBAN=:WAFLBAN,"
                + "WAFLPAN=:WAFLPAN,"
                + "WAFABKZAN=:WAFABKZAN,"
                + "WAFPKL=:WAFPKL,"
                + "WAFVBBRT=:WAFVBBRT,"
                + "WAFBRTTOLPL=:WAFBRTTOLPL,"
                + "WAFBRTTOLMI=:WAFBRTTOLMI,"
                + "WAFVBGRQM=:WAFVBGRQM,"
                + "WAFVBGRLFD=:WAFVBGRLFD,"
                + "WAFGWTOLPL=:WAFGWTOLPL,"
                + "WAFGWTOLMIN=:WAFGWTOLMIN,"
                + "WAFVBFDDIK=:WAFVBFDDIK,"
                + "WAFFDKTOLPL=:WAFFDKTOLPL,"
                + "WAFFDKTOLMI=:WAFFDKTOLMI,"
                + "WAFVBFDDIS=:WAFVBFDDIS,"
                + "WAFFDSTOLPL=:WAFFDSTOLPL,"
                + "WAFFDSTOLMI=:WAFFDSTOLMI,"
                + "WAFLAEAEND=:WAFLAEAEND,"
                + "WAFGWVERL=:WAFGWVERL,"
                + "WAFRESTSCHL=:WAFRESTSCHL,"
                + "WAFPHWERTMI=:WAFPHWERTMI,"
                + "WAFPHWERTMA=:WAFPHWERTMA,"
                + "WAFWEISSGRD=:WAFWEISSGRD,"
                + "WAFNETZFVON=:WAFNETZFVON,"
                + "WAFNETZFBIS=:WAFNETZFBIS,"
                + "WAFNETZFSEK=:WAFNETZFSEK,"
                + "WAFRSSFTRKV=:WAFRSSFTRKV,"
                + "WAFRSSFTRKB=:WAFRSSFTRKB,"
                + "WAFRSSFTRSV=:WAFRSSFTRSV,"
                + "WAFRSSFTRSB=:WAFRSSFTRSB,"
                + "WAFUNIFAEH=:WAFUNIFAEH,"
                + "WAFFADGERAD=:WAFFADGERAD,"
                + "WAFMUSTFRB=:WAFMUSTFRB,"
                + "WAFVORB=:WAFVORB,"
                + "WAFNACHB=:WAFNACHB,"
                + "WAFMU=:WAFMU,"
                + "WAFMURLOD=:WAFMURLOD,"
                + "WAFMUPROD=:WAFMUPROD,"
                + "WAFMUCTOD=:WAFMUCTOD,"
                + "WAFMUDTRL=:WAFMUDTRL,"
                + "WAFMUBIRL=:WAFMUBIRL,"
                + "WAFHUNGLFM=:WAFHUNGLFM,"
                + "WAFHUNGQM=:WAFHUNGQM,"
                + "WAFHUNBRT=:WAFHUNBRT,"
                + "WAFHUNFDK=:WAFHUNFDK,"
                + "WAFHUNFDS=:WAFHUNFDS"
                + " WHERE  "
                + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART  AND WAFVAR=:WAFVAR  AND WAFZUART=:WAFZUART  AND WAFZUSATZ=:WAFZUSATZ";

            or1.Parameters.Add("WAFLMANRKRS", OracleType.NVarChar).Value = dwData["WAFLMANRKRS"].ToString();
            or1.Parameters.Add("WAFLMALFDNR", OracleType.NVarChar).Value = dwData["WAFLMALFDNR"].ToString();
            or1.Parameters.Add("WAFLMAPOS", OracleType.NVarChar).Value = dwData["WAFLMAPOS"].ToString();
            or1.Parameters.Add("WAFLODKRS", OracleType.NVarChar).Value = dwData["WAFLODKRS"].ToString();
            or1.Parameters.Add("WAFLODLFD", OracleType.NVarChar).Value = dwData["WAFLODLFD"].ToString();
            or1.Parameters.Add("WAFLODPOS", OracleType.NVarChar).Value = dwData["WAFLODPOS"].ToString();
            or1.Parameters.Add("WAFKZDUMCOL", OracleType.NVarChar).Value = dwData["WAFKZDUMCOL"].ToString();
            or1.Parameters.Add("WAFPSEUDOCOL", OracleType.NVarChar).Value = dwData["WAFPSEUDOCOL"].ToString();
            or1.Parameters.Add("WAFPRFSCHL", OracleType.NVarChar).Value = dwData["WAFPRFSCHL"].ToString();
            or1.Parameters.Add("WAFFILLER", OracleType.NVarChar).Value = dwData["WAFFILLER"].ToString();
            or1.Parameters.Add("WAFAENDZL", OracleType.NVarChar).Value = dwData["WAFAENDZL"].ToString();
            or1.Parameters.Add("WAFAENDBEN", OracleType.NVarChar).Value = dwData["WAFAENDBEN"].ToString();
            or1.Parameters.Add("WAFAENDDAT", OracleType.NVarChar).Value = dwData["WAFAENDDAT"].ToString();
            or1.Parameters.Add("WAFNEUBEN", OracleType.NVarChar).Value = dwData["WAFNEUBEN"].ToString();
            or1.Parameters.Add("WAFNEUDAT", OracleType.NVarChar).Value = dwData["WAFNEUDAT"].ToString();
            or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = dwData["WAFMANDANT"].ToString();
            or1.Parameters.Add("WAFKUNDNR", OracleType.NVarChar).Value = dwData["WAFKUNDNR"].ToString();
            or1.Parameters.Add("WAFWERK", OracleType.NVarChar).Value = dwData["WAFWERK"].ToString();
            or1.Parameters.Add("WAFABT", OracleType.NVarChar).Value = dwData["WAFABT"].ToString();
            or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = dwData["WAFART"].ToString();
            or1.Parameters.Add("WAFVAR", OracleType.NVarChar).Value = dwData["WAFVAR"].ToString();
            or1.Parameters.Add("WAFZUART", OracleType.NVarChar).Value = dwData["WAFZUART"].ToString();
            or1.Parameters.Add("WAFZUSATZ", OracleType.NVarChar).Value = dwData["WAFZUSATZ"].ToString();
            or1.Parameters.Add("WAFCOLORIT", OracleType.NVarChar).Value = dwData["WAFCOLORIT"].ToString();
            or1.Parameters.Add("WAFSTATUS", OracleType.NVarChar).Value = dwData["WAFSTATUS"].ToString();
            or1.Parameters.Add("WAFSFKZ", OracleType.NVarChar).Value = dwData["WAFSFKZ"].ToString();
            or1.Parameters.Add("WAFBEZ", OracleType.NVarChar).Value = dwData["WAFBEZ"].ToString();
            or1.Parameters.Add("WAFTEXTSCHL", OracleType.NVarChar).Value = dwData["WAFTEXTSCHL"].ToString();
            or1.Parameters.Add("WAFFKARTNR", OracleType.NVarChar).Value = dwData["WAFFKARTNR"].ToString();
            or1.Parameters.Add("WAFROHFARBE", OracleType.NVarChar).Value = dwData["WAFROHFARBE"].ToString();
            or1.Parameters.Add("WAFMUDESS", OracleType.NVarChar).Value = dwData["WAFMUDESS"].ToString();
            or1.Parameters.Add("WAFUNIFARB", OracleType.NVarChar).Value = dwData["WAFUNIFARB"].ToString();
            or1.Parameters.Add("WAFVGRQM", OracleType.NVarChar).Value = dwData["WAFVGRQM"].ToString();
            or1.Parameters.Add("WAFVOLU", OracleType.NVarChar).Value = dwData["WAFVOLU"].ToString();
            or1.Parameters.Add("WAFZTWAHL", OracleType.NVarChar).Value = dwData["WAFZTWAHL"].ToString();
            or1.Parameters.Add("WAFRAPPH", OracleType.NVarChar).Value = dwData["WAFRAPPH"].ToString();
            or1.Parameters.Add("WAFRAPPB", OracleType.NVarChar).Value = dwData["WAFRAPPB"].ToString();
            or1.Parameters.Add("WAFRUESTGRP", OracleType.NVarChar).Value = dwData["WAFRUESTGRP"].ToString();
            or1.Parameters.Add("WAFPRUEFGRP", OracleType.NVarChar).Value = dwData["WAFPRUEFGRP"].ToString();
            or1.Parameters.Add("WAFSCHABANZ", OracleType.NVarChar).Value = dwData["WAFSCHABANZ"].ToString();
            or1.Parameters.Add("WAFUSCHABANZ", OracleType.NVarChar).Value = dwData["WAFUSCHABANZ"].ToString();
            or1.Parameters.Add("WAFFDVF", OracleType.NVarChar).Value = dwData["WAFFDVF"].ToString();
            or1.Parameters.Add("WAFPRGRP", OracleType.NVarChar).Value = dwData["WAFPRGRP"].ToString();
            or1.Parameters.Add("WAFGRPBEZ", OracleType.NVarChar).Value = dwData["WAFGRPBEZ"].ToString();
            or1.Parameters.Add("WAFPREIS", OracleType.NVarChar).Value = dwData["WAFPREIS"].ToString();
            or1.Parameters.Add("WAFZUABPR", OracleType.NVarChar).Value = dwData["WAFZUABPR"].ToString();
            or1.Parameters.Add("WAFZUABAB", OracleType.NVarChar).Value = dwData["WAFZUABAB"].ToString();
            or1.Parameters.Add("WAFNFART", OracleType.NVarChar).Value = dwData["WAFNFART"].ToString();
            or1.Parameters.Add("WAFWERT", OracleType.NVarChar).Value = dwData["WAFWERT"].ToString();
            or1.Parameters.Add("WAFKZPA", OracleType.NVarChar).Value = dwData["WAFKZPA"].ToString();
            or1.Parameters.Add("WAFZUABVH", OracleType.NVarChar).Value = dwData["WAFZUABVH"].ToString();
            or1.Parameters.Add("WAFZUABAK", OracleType.NVarChar).Value = dwData["WAFZUABAK"].ToString();
            or1.Parameters.Add("WAFZUABKU", OracleType.NVarChar).Value = dwData["WAFZUABKU"].ToString();
            or1.Parameters.Add("WAFZUABPROZ", OracleType.NVarChar).Value = dwData["WAFZUABPROZ"].ToString();
            or1.Parameters.Add("WAFEZUSTAND1", OracleType.NVarChar).Value = dwData["WAFEZUSTAND1"].ToString();
            or1.Parameters.Add("WAFEZUSTAND2", OracleType.NVarChar).Value = dwData["WAFEZUSTAND2"].ToString();
            or1.Parameters.Add("WAFEZUSTAND3", OracleType.NVarChar).Value = dwData["WAFEZUSTAND3"].ToString();
            or1.Parameters.Add("WAFEZUSTAND4", OracleType.NVarChar).Value = dwData["WAFEZUSTAND4"].ToString();
            or1.Parameters.Add("WAFEZUSTAND5", OracleType.NVarChar).Value = dwData["WAFEZUSTAND5"].ToString();
            or1.Parameters.Add("WAFEZUSTAND6", OracleType.NVarChar).Value = dwData["WAFEZUSTAND6"].ToString();
            or1.Parameters.Add("WAFEZUSTAND7", OracleType.NVarChar).Value = dwData["WAFEZUSTAND7"].ToString();
            or1.Parameters.Add("WAFEZUSTAND8", OracleType.NVarChar).Value = dwData["WAFEZUSTAND8"].ToString();
            or1.Parameters.Add("WAFEZUSTAND9", OracleType.NVarChar).Value = dwData["WAFEZUSTAND9"].ToString();
            or1.Parameters.Add("WAFEZUSTAND10", OracleType.NVarChar).Value = dwData["WAFEZUSTAND10"].ToString();
            or1.Parameters.Add("WAFFA", OracleType.NVarChar).Value = dwData["WAFFA"].ToString();
            or1.Parameters.Add("WAFGA", OracleType.NVarChar).Value = dwData["WAFGA"].ToString();
            or1.Parameters.Add("WAFQA", OracleType.NVarChar).Value = dwData["WAFQA"].ToString();
            or1.Parameters.Add("WAFQPKTH", OracleType.NVarChar).Value = dwData["WAFQPKTH"].ToString();
            or1.Parameters.Add("WAFQPKTLH", OracleType.NVarChar).Value = dwData["WAFQPKTLH"].ToString();
            or1.Parameters.Add("WAFLOAN", OracleType.NVarChar).Value = dwData["WAFLOAN"].ToString();
            or1.Parameters.Add("WAFLBAN", OracleType.NVarChar).Value = dwData["WAFLBAN"].ToString();
            or1.Parameters.Add("WAFLPAN", OracleType.NVarChar).Value = dwData["WAFLPAN"].ToString();
            or1.Parameters.Add("WAFABKZAN", OracleType.NVarChar).Value = dwData["WAFABKZAN"].ToString();
            or1.Parameters.Add("WAFPKL", OracleType.NVarChar).Value = dwData["WAFPKL"].ToString();
            or1.Parameters.Add("WAFVBBRT", OracleType.NVarChar).Value = dwData["WAFVBBRT"].ToString();
            or1.Parameters.Add("WAFBRTTOLPL", OracleType.NVarChar).Value = dwData["WAFBRTTOLPL"].ToString();
            or1.Parameters.Add("WAFBRTTOLMI", OracleType.NVarChar).Value = dwData["WAFBRTTOLMI"].ToString();
            or1.Parameters.Add("WAFVBGRQM", OracleType.NVarChar).Value = dwData["WAFVBGRQM"].ToString();
            or1.Parameters.Add("WAFVBGRLFD", OracleType.NVarChar).Value = dwData["WAFVBGRLFD"].ToString();
            or1.Parameters.Add("WAFGWTOLPL", OracleType.NVarChar).Value = dwData["WAFGWTOLPL"].ToString();
            or1.Parameters.Add("WAFGWTOLMIN", OracleType.NVarChar).Value = dwData["WAFGWTOLMIN"].ToString();
            or1.Parameters.Add("WAFVBFDDIK", OracleType.NVarChar).Value = dwData["WAFVBFDDIK"].ToString();
            or1.Parameters.Add("WAFFDKTOLPL", OracleType.NVarChar).Value = dwData["WAFFDKTOLPL"].ToString();
            or1.Parameters.Add("WAFFDKTOLMI", OracleType.NVarChar).Value = dwData["WAFFDKTOLMI"].ToString();
            or1.Parameters.Add("WAFVBFDDIS", OracleType.NVarChar).Value = dwData["WAFVBFDDIS"].ToString();
            or1.Parameters.Add("WAFFDSTOLPL", OracleType.NVarChar).Value = dwData["WAFFDSTOLPL"].ToString();
            or1.Parameters.Add("WAFFDSTOLMI", OracleType.NVarChar).Value = dwData["WAFFDSTOLMI"].ToString();
            or1.Parameters.Add("WAFLAEAEND", OracleType.NVarChar).Value = dwData["WAFLAEAEND"].ToString();
            or1.Parameters.Add("WAFGWVERL", OracleType.NVarChar).Value = dwData["WAFGWVERL"].ToString();
            or1.Parameters.Add("WAFRESTSCHL", OracleType.NVarChar).Value = dwData["WAFRESTSCHL"].ToString();
            or1.Parameters.Add("WAFPHWERTMI", OracleType.NVarChar).Value = dwData["WAFPHWERTMI"].ToString();
            or1.Parameters.Add("WAFPHWERTMA", OracleType.NVarChar).Value = dwData["WAFPHWERTMA"].ToString();
            or1.Parameters.Add("WAFWEISSGRD", OracleType.NVarChar).Value = dwData["WAFWEISSGRD"].ToString();
            or1.Parameters.Add("WAFNETZFVON", OracleType.NVarChar).Value = dwData["WAFNETZFVON"].ToString();
            or1.Parameters.Add("WAFNETZFBIS", OracleType.NVarChar).Value = dwData["WAFNETZFBIS"].ToString();
            or1.Parameters.Add("WAFNETZFSEK", OracleType.NVarChar).Value = dwData["WAFNETZFSEK"].ToString();
            or1.Parameters.Add("WAFRSSFTRKV", OracleType.NVarChar).Value = dwData["WAFRSSFTRKV"].ToString();
            or1.Parameters.Add("WAFRSSFTRKB", OracleType.NVarChar).Value = dwData["WAFRSSFTRKB"].ToString();
            or1.Parameters.Add("WAFRSSFTRSV", OracleType.NVarChar).Value = dwData["WAFRSSFTRSV"].ToString();
            or1.Parameters.Add("WAFRSSFTRSB", OracleType.NVarChar).Value = dwData["WAFRSSFTRSB"].ToString();
            or1.Parameters.Add("WAFUNIFAEH", OracleType.NVarChar).Value = dwData["WAFUNIFAEH"].ToString();
            or1.Parameters.Add("WAFFADGERAD", OracleType.NVarChar).Value = dwData["WAFFADGERAD"].ToString();
            or1.Parameters.Add("WAFMUSTFRB", OracleType.NVarChar).Value = dwData["WAFMUSTFRB"].ToString();
            or1.Parameters.Add("WAFVORB", OracleType.NVarChar).Value = dwData["WAFVORB"].ToString();
            or1.Parameters.Add("WAFNACHB", OracleType.NVarChar).Value = dwData["WAFNACHB"].ToString();
            or1.Parameters.Add("WAFMU", OracleType.NVarChar).Value = dwData["WAFMU"].ToString();
            or1.Parameters.Add("WAFMURLOD", OracleType.NVarChar).Value = dwData["WAFMURLOD"].ToString();
            or1.Parameters.Add("WAFMUPROD", OracleType.NVarChar).Value = dwData["WAFMUPROD"].ToString();
            or1.Parameters.Add("WAFMUCTOD", OracleType.NVarChar).Value = dwData["WAFMUCTOD"].ToString();
            or1.Parameters.Add("WAFMUDTRL", OracleType.NVarChar).Value = dwData["WAFMUDTRL"].ToString();
            or1.Parameters.Add("WAFMUBIRL", OracleType.NVarChar).Value = dwData["WAFMUBIRL"].ToString();
            or1.Parameters.Add("WAFHUNGLFM", OracleType.NVarChar).Value = dwData["WAFHUNGLFM"].ToString();
            or1.Parameters.Add("WAFHUNGQM", OracleType.NVarChar).Value = dwData["WAFHUNGQM"].ToString();
            or1.Parameters.Add("WAFHUNBRT", OracleType.NVarChar).Value = dwData["WAFHUNBRT"].ToString();
            or1.Parameters.Add("WAFHUNFDK", OracleType.NVarChar).Value = dwData["WAFHUNFDK"].ToString();
            or1.Parameters.Add("WAFHUNFDS", OracleType.NVarChar).Value = dwData["WAFHUNFDS"].ToString();
            Connect2Proxy(or1);
        }
    }
}
